Ext.namespace("Budget.Main");

Budget.Main.tabIndex = {
	"search" : 0
};
Budget.Main.tabs = [];

Budget.initUI = function() {
	var opentab = Utils.getParameter('opentab');
	if (!opentab) opentab = "search";	
	// init tabs
	Budget.Main.tabs.push(new Budget.Search2());
	Budget.instance = new Ext.TabPanel({
		region: 'center',
		activeTab: Budget.Main.tabIndex[opentab],
		items: Budget.Main.tabs
	});
	
	var mainview = new Ext.Viewport({
        layout:'border',
        items:[Budget.instance]
    });
};

Ext.onReady(function(){
	Ext.QuickTips.init();
    Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
	Budget.initUI();
});

